package com.ynny.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class PathVariableTestController {


    @GetMapping("/sayHello/{id}/{name}")
    @ResponseBody
    public String sayHello(@PathVariable(name = "id") Integer id,
                           @PathVariable(name = "name") String name){

        System.out.println("id = " + id);
        System.out.println("name = " + name);
        return "sayHello";
    }


}
